<template>
	<div class="company-info">
		<!-- 顶部用户信息 -->
		<v-info @userInfoChange="userInfoChange" :showRZ = true></v-info>
		<div class="company-info-box company-info-b">
			<!-- 企业基本信息 -->
			<div class="company-info-b-box" style="border-top:none">
				<div class="company-info-b-title">{{$t('common.company.companyInfo')}}</div>
				<div class="company-info-b-content">
					<div class="company-info-b-table flex">
						<div class="company-info-b-table-box">
							<div class="company-info-b-content-title">{{$t('common.company.companyName')}}：<span>{{formData.enterpriseName}}</span></div>
							<div class="company-info-b-content-title">{{$t('common.company.companyCapital')}}：<span>{{formData.registeredCapital}}{{$t('common.tips.thousand')}}</span></div>
							<div class="company-info-b-content-title">{{$t('common.company.companyEmployees')}}：<span>{{formData.staffNumberTxt||0}}人</span></div>
						</div>
						<div class="company-info-b-table-box">
							<div class="company-info-b-content-title">{{$t('common.company.companyCode')}}：<span>{{formData.uscc}}</span></div>
							<div class="company-info-b-content-title">{{$t('common.company.companyDate')}}：<span>{{formData.establishmentDate}}</span></div>
							<div class="company-info-b-content-title">{{$t('common.company.companyIntellectual')}}：<span>{{formData.ipcount||0}}个<span>（{{$t('common.company.companytask1')}}）</span></span></div>
						</div>
						
						<div class="company-info-b-table-box">
							<div class="company-info-b-content-title">{{$t('common.company.companyLegal')}}：<span>{{formData.lawPerson}}</span></div>
							<div class="company-info-b-content-title">{{$t('common.company.companyType')}}：<span>{{detail.corporateTypeTxt}}</span></div>
						</div>
					</div>
					<div class="company-info-b-table-box" v-if="formData.belongJob && formData.belongJob.length>0">
						<div class="company-info-b-content-title">{{$t('common.resume.belongJob')}}：<span>{{formData.industryTxt}}</span></div>
					</div>
          <div class="company-info-b-table-box" v-if="formData.industryTxt && formData.industryTxt.length>0">
          	<div class="company-info-b-content-title">{{$t('common.resume.belongJob')}}:
              {{formData.industryTxt}}
            </div>
          </div>
					<div class="company-info-b-table-box" v-if="formData.address && formData.address.length>0">
						<div class="company-info-b-content-title">{{$t('common.foot.address')}}
              <el-input type="textarea" class="new" v-model="formData.address" autosize disabled></el-input>
            </div>
					</div>
					<div class="company-info-b-content-title" v-if="formData.enterpriseInfo && formData.enterpriseInfo.length>0">
						{{$t('common.company.companyBusiness')}}：
            <el-input type="textarea" class="new" v-model="formData.enterpriseInfo" autosize disabled></el-input>
            </div>
					<div class="company-info-b-content-title company-info-b-content-tags" v-if="qyLabe && qyLabe.length>0">
						{{$t('common.company.companyTags')}}:

						<span v-for="(item, index) in qyLabe" :key="index" class="font12 red1">{{item.text}}</span>
					</div>
				</div>
			</div>
			<!-- 核心技术与产品方向 -->
			<div class="company-info-b-box" v-if="formData.technologyDirectionList && formData.technologyDirectionList.length>0">
				<div class="company-info-b-title">{{$t('common.company.companyDirection')}}</div>
				<div class="company-info-b-content" v-for="(item,index) in formData.technologyDirectionList" :key="index">
					<div class="company-info-b-content-title">{{$t('common.detail.productName')}}：<b>{{item.name}}</b></div>
					<div class="company-info-b-content-title">{{$t('common.detail.productDetail')}}：
            <el-input type="textarea" class="new" v-model="item.description" autosize disabled></el-input>
          </div>
				</div>
				<div class="company-info-b-content-title company-info-b-content-tags">{{$t('common.detail.productTags')}}：
					<span v-for="(items, idxs) in productTagListed" :key="idxs" class="font12 red1">{{items.text}}</span>
				</div>
			</div>
			<!-- 企业资质信息 -->
			<div class="company-info-b-box" v-if="imgs2 && imgs2.length>0">
				<div class="company-info-b-title">{{$t('common.company.companyQualification')}}</div>
				<div class="company-info-b-content">
					<img :src="imgs2" alt="" class="zz">
				</div>
			</div>
			<!-- 企业简介 -->
			<div class="company-info-b-box" v-if="formData.enterpriseProfile && formData.enterpriseProfile.length>0">
				<div class="company-info-b-title">{{$t('common.company.companyBrief')}}</div>
				<div class="company-info-b-content">
          <el-input type="textarea" class="new" v-model="formData.enterpriseProfile" autosize disabled></el-input>
				</div>
			</div>
		</div>
	</div>
</template>
<script>
  import info from '@/components/info.vue'
	export default {
		components:{
			'v-info':info
		},
    data(){
      return{
				rz: false, //是否认证
				detail:[],
				formData:{},
				qyLabe:[],
				imgUrl:this.$store.state.imgUrl,
				imgs1:'',
				imgs2:'',
				productTagListed:[]
      }
    },
	methods:{
		userInfoChange(e){
			console.log('userInfoChange',e)
			this.formData = e.formData;
			this.imgs1 = e.imgs1;
			this.imgs2 = e.imgs2;
			this.qyLabe = e.qyLabe
			this.detail = e.detail
			this.productTagListed = e.productTagListed
		},
	},
	mounted() {
		
	},
	watch:{
		'$i18n.locale'(){
			this.content()
		},
	}
  }
</script>
<style lang="scss">
.company-info{
	width: 100%;
	height: auto;
	img{width: 100%;display: block;}
	.company-info-box{
		width: 100%;
		height: auto;
		background-color: #fff;
		padding: 0 30px;
		margin-bottom: 14px;
	}
	.company-info-b{
		.company-info-b-head{
			padding: 30px 0;
			.company-info-b-photo{
				width: 100px;
				height: 100px;
				overflow: hidden;
			}
			.company-info-b-right{
				flex: 1;
				padding-left: 28px;
				p>span{
					margin: 0 10px;
					color: #999;
				}
				.company-info-b-right-name{
					margin-bottom: 18px;
					span{
						font-size: 24px;
					}
				}
			}
		}
		.company-info-b-box{
			width: 100%;
			padding: 30px 0;
			border-top: 1px solid #D6D7DC;
			
			.company-info-b-title{
				font-size: 16px;
				font-weight: bold;
				padding-left: 17px;
				position: relative;
				margin-bottom: 30px;
			}
			.company-info-b-title::before{
				content: "";
				position: absolute;
				width: 3px;
				height: 16px;
				left: 0;
				top: 50%;
				transform:translateY(-50%);
				background-color: #0F54BC;
			}
			.company-info-b-content{
				padding: 0 17px;
				.zz{max-width: 500px;}
				p{
					line-height: 22px;
					margin-bottom: 12px;
				}
				.company-info-b-content-title{
					color: #666;
					span{
						color: #333;
						span{
							color: #999;
						}
					}
					margin-bottom: 12px;
				}
				.company-info-b-table{
					justify-content: space-between;
					padding-right: 70px;
					.company-info-b-table-box{
						// flex: 1;
					}
				}
			}
			.company-info-b-content-tags{
				flex-wrap: wrap;
				span{
					display: inline-block;
					padding: 5px 14px;
					background:rgba(15,84,188,0.05);
					color: #0F54BC;
					margin-right: 10px;
					margin-bottom: 10px;
				}
			}
		}
	}
}
</style>
